package com.leyou.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum {
    PRICE_CANNOT_BE_NULL(400,"价格不能为空"),
    CATEGORY_NOT_FOUND(404,"商品分类没查到"),
    GOOD_NOT_FOUND(404,"商品没查到"),
    ORDER_NOT_FOUND(404,"订单没查到"),
    ORDER_DETAIL_NOT_FOUND(404,"订单详情没查到"),
    ORDER_STATUS_NOT_FOUND(404,"订单状态没查到"),
    CART_NOT_FOUND(404,"购物车没查到"),
    GOOD_SKU_NOT_FOUND(404,"商品sku没查到"),
    GOOD_STOCK_NOT_FOUND(404,"商品库存没查到"),
    BRAND_NOT_FOUND(404,"品牌分类没查到"),
    BRAND_CREATED_FAIL(500,"品牌新增失败"),
    GOOD_CREATED_FAIL(500,"商品新增失败"),
    ORDER_CREATED_FAIL(500,"订单新增失败"),
    INVALID_FILE_TYPE(401,"上传文件类型不允许"),
    SPEC_GROUP_NOT_FOUND(404,"商品分类规格组没查到"),
    SPEC_PARAM_NOT_FOUND(404,"商品分类参数没查到"),
    INVALID_USER_TYPE(400,"用户数据校验类型不合法"),
    INVALID_VERIFY_CODE(400,"无效的验证码"),
    INVALID_USERNAME_PASSWORD(400,"用户名或密码错误"),
    USER_REGISTER_FAIL(500,"用户注册失败"),
    CREATE_TOKEN_ERROR(500,"用户凭证生成失败"),
    UNAUTHORIZED(401,"未授权"),
    STOCK_NOT_ENOUGH(500,"库存不足"),
    WEIXIN_PAY_FAIL(500,"微信下单失败"),
    ORDER_STATUS_ERROR(500,"订单状态异常"),
    WEIXIN_INVALID_SIGN(500,"微信签名错误,不一致"),
    WEIXIN_INVALID_ORDER_PRAM(500,"微信订单参数异常"),
    UPDATE_ORDER_STATUS_FAIL(500,"更新订单状态失败"),
    ;
    private int code;
    private String msg;

}
